const menuModel = require("../models/menu");

const getMenu = async (ctx) => {
  let { OrgId } = ctx.request.query;
  const res = await menuModel.findOne({ orgId: OrgId });
  if (res) {
    ctx.body = { code: 200, msg: "获取菜单数据成功", data: res.menu };
  } else {
    ctx.body = { code: 404, msg: "未找到相关的菜单信息" };
  }
};
module.exports = {
  getMenu
};